package com.chj233.blogOtg;

import android.os.Bundle;

import androidx.annotation.Nullable;
import androidx.appcompat.app.AppCompatActivity;

import com.chj233.blogOtg.otg.OtgHandle;
import com.chj233.blogOtg.otg.SerialInter;

/***
 * 作者：chj233
 * 时间：2022/7/14 11:14
 * 描述：
 */
public class ChjTestActivity extends AppCompatActivity implements SerialInter {

    private OtgHandle otgHandle;

    @Override
    protected void onCreate(@Nullable Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        otgHandle = new OtgHandle();
        new Thread(()->{
            otgHandle.open(this,30264,1200,8,0,1);
            otgHandle.onDataListener(this);
        }).start();
    }

    @Override
    public void connectMsg(Exception e) {

    }

    @Override
    public void readData(byte[] bytes) {

    }
}
